package com.gree.common.entity;

import com.gree.common.annotation.Excel;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.nutz.dao.entity.annotation.Column;
import org.nutz.dao.entity.annotation.Id;
import org.nutz.dao.entity.annotation.Table;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;
import java.io.Serializable;
import java.util.Date;

/**
 * Created by 180686 on 2021/3/23 19:03
 */

@Data
@Table("SYS_DICT_TYPE")
@ApiModel(description = "系统数据字典-类型")
public class SysDictType extends BaseEntity implements Serializable
{
    private static final long serialVersionUID = 1L;

    @Id
    @Excel(name = "字典主键", cellType = Excel.ColumnType.NUMERIC)
    @ApiModelProperty("字典主键")
    private Long dict_id;

    @Column
    @Excel(name = "字典名称")
    @NotBlank(message = "字典名称不能为空")
    @Size(min = 0, max = 100, message = "字典类型名称长度不能超过100个字符")
    @ApiModelProperty("字典名称")
    private String dict_name;

    @Column
    @Excel(name = "字典类型")
    @NotBlank(message = "字典类型不能为空")
    @Size(min = 0, max = 100, message = "字典类型类型长度不能超过100个字符")
    @ApiModelProperty("字典类型")
    private String dict_type;

    @Column
    @Excel(name = "状态", readConverterExp = "0=正常,1=停用")
    @ApiModelProperty("状态")
    private String status;

    @Column
    @ApiModelProperty("创建者")
    private String create_by;

    @Column
    @ApiModelProperty("创建时间")
    private Date create_time;

    @Column
    @ApiModelProperty("更新者")
    private String update_by;

    @Column
    @ApiModelProperty("更新时间")
    private Date update_time;

    @Column
    @ApiModelProperty("备注")
    private String remark;
}
